package com.xxkj.drugtraceability.ui.patientlist

import com.xxkj.drugtraceability.base.BaseRepository
import com.xxkj.drugtraceability.bean.*
import com.xxkj.drugtraceability.net.Result
import com.xxkj.drugtraceability.net.WanService

/**
 * author: zhoujingjin
 * created on: 2024/9/10 9:04
 * description:
 */
class PatientListRepository(private val wanService: WanService):BaseRepository() {

    suspend fun queryAllDept(): Result<BaseData<MutableList<DepartBean>>> {
        return safeApiCall { executeResponse(wanService.queryAllDept()) }
    }
    suspend fun queryPatientList( data:String): Result<BaseData<PatientData>> {
        return safeApiCall { executeResponse(wanService.queryPatientList(data)) }
    }
    /*
   * 获取医嘱列表数据
   */
    suspend fun getDoctorOrderedInfoList( prescriptioninfo:String): Result<BaseData<List<DoctorAdviceInfoBean>>> {
        return safeApiCall { executeResponse(wanService.getDoctorOrderedInfoList(prescriptioninfo)) }
    }
}